package com.example.lxy.service.impl;

import com.example.lxy.mapper.Accessmapper;
import com.example.lxy.pojo.access;
import com.example.lxy.pojo.role;
import com.example.lxy.pojo.roleaccess;
import com.example.lxy.service.AccessService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;

@Service
public class AccessServiceImpl implements AccessService {

    @Autowired
    private Accessmapper accessmapper;
    @Override
    public List<access> list() {
        return accessmapper.list();
    }

    @Override
    public List<role> listid(int rid) {
        return accessmapper.listid(rid);
    }

    @Override
    public int deleteUserAllById(List<String> chaojiid) {
        HashMap<String, List<String>> map = new HashMap<>();
        map.put("chaojiid",chaojiid);
        return accessmapper.deleteUserAllById(map);
    }

    @Override
    public void adds(roleaccess ra) {
        accessmapper.adds(ra);
    }
}
